<% layout('/layouts/default.html', {title: '步骤管理', libs: ['validate','fileupload']}){ %>
<div class="main-content">
	<div class="box box-main">
		<#form:form id="inputForm" model="${ptShichangBuzhou}" action="${ctx}/pt/ptShichangBuzhou/save" method="post" class="form-horizontal">
			<div class="box-body">
				<#form:hidden path="id"/>
				<#form:hidden path="shichangId"/>
				<#form:hidden path="pic"/>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('序号')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-4">
								<#form:input path="xuhao" maxlength="9" class="form-control digits"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('图片')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-4">
								<#form:fileupload id="uploadImage" bizKey="${ptShichangBuzhou.id}" bizType="ptShichangBuzhou_image"
								uploadType="image" returnPath="true" maxUploadNum="1" filePathInputId="pic" class="" readonly="false" preview="true"/>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-xs-12">
						<div class="form-group">
							<label class="control-label col-sm-2" title="">
								<span class="required hide">*</span> ${text('说明')}：<i class="fa icon-question hide"></i></label>
							<div class="col-sm-4">
								<#form:textarea path="text" rows="3" maxlength="200" maxlength="255" class="form-control"/>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="box-footer">
				<div class="row">
					<div class="col-sm-offset-2 col-sm-10">
						<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('保 存')}</button>&nbsp;
						<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
					</div>
				</div>
			</div>
		</#form:form>
	</div>
</div>
<% } %>
<script>
$("#inputForm").validate({
	submitHandler: function(form){
		js.ajaxSubmitForm($(form), function(data){
			js.showMessage(data.message);
			if(data.result == Global.TRUE){
				js.closeCurrentTabPage(function(contentWindow){
					contentWindow.page();
				});
			}
		}, "json");
    }
});
</script>